<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Aterrizar.com</title>
    </head>
    <body>
        <f:view>
            <h1><h:outputText value="AVIONES" /></h1>
            <h:form>
                <table>
                        <tr>
                            <th>ID</th>
                            <th>MODELO</th>
                        </tr>
                    <c:forEach items="#{AvionBean.aviones}" var="avion">                        
                        <tr>                            
                            <td>
                                <c:out value="${avion.id}"/>
                            </td>
                            <td>
                                <c:out value="${avion.modelo}"/>
                            </td>
                        </tr>
                    </c:forEach>
                </table>
                <br />
                <p>
                    <h:inputText value="#{AvionBean.modeloNuevo}" id="modelo" required="true"/>&nbsp;
                    <h:message for="modelo" style="color:red" />
                </p>
                <h:commandButton action="submit" value="alta modelo" />
            </h:form>            
        </f:view>
    </body>
</html>
